home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / util / shell / ViNCEd.lha / ViNCEd / Include / vnc / prefs.h < prev    next >
C/C++ Source or Header  |  1998-08-22  |  13KB  |  382 lines

  1. #ifndef VNC_PREFS_H
  2. #define VNC_PREFS_H
  3. /*********************************************************
  4.  ** ViNCEd                                              **
  5.  ** a DOS - window handler                              **
  6.  **                                                     **
  7.  ** © 1991-98 THOR-Software inc.                        **
  8.  ** Version 3.60                                        **
  9.  **                                                     **
  10.  ** program version 3.60 21 Aug 1998    THOR            **
  11.  **                                                     **
  12.  ** ViNCEd Prefs Definitions                            **
  13.  **-----------------------------------------------------**
  14.  **                                                     **
  15.  ** all use at your own risk,etc.,etc.                  **
  16.  **                                                     **
  17.  ** Everything declared as "reserved" or                **
  18.  ** "not used" is NOT free for your use,                **
  19.  ** it will propably used in a later release.           **
  20.  ** All FREE entries are free for public                **
  21.  ** use and are, if not otherwise noticed,              **
  22.  ** initialized as ZERO                                 **
  23.  *********************************************************/
  24.  
  25. #ifndef EXEC_TYPES_H
  26. #include <exec/types.h>
  27. #endif
  28.  
  29. #ifndef VNC_KEYBOARD_H
  30. #include <vnc/keyboard.h>
  31. #endif
  32.  
  33. /*************************************************
  34.  ** VNCPrefs                                    **
  35.  ** contains the preferences of                 **
  36.  ** all VNC-windows                             **
  37.  *************************************************/
  38.  
  39. #define VPF_HEADERLONG          0x70004e75      /* moveq #0,d0:rts */
  40. #define VPF_MAGIC1              (('V'<<24L)|('N'<<16L)|('C'<<8L)|('©'))
  41. #define VPF_MAGIC2              (('T'<<24L)|('H'<<16L)|('O'<<8L)|('R'))
  42. #define VPF_PREFVERSION         3
  43. #define VPF_PREFREVISION        3
  44.                 /* current version information */
  45.  
  46. #define VPF_MAXBUTTONS          16
  47.         /* maximal number of buttons here */
  48.  
  49. #define VPF_MACROS              24
  50.         /* current number of macros. DO NOT DEPEND ON THIS NUMBER !
  51.            read the number of available macros from the structures
  52.            below. */
  53.  
  54. #define VPF_FUNCLENGTH          126
  55.         /* maximal size of a macro */
  56.  
  57. #define VPF_SHORTLENGTH         16
  58.         /* maximal size of a button title */
  59.  
  60. #define VPF_MACROLENGHT         32
  61.         /* maximal size of a macro shortcut. This is only used internally.
  62.            The display is cut down to this size, and an ellipsis is appended
  63.            if oversized. */
  64.  
  65.  
  66. struct ViColorEntry {
  67.         UWORD   vce_Flags;      /* color entry flags, see below */
  68.         UWORD   vce_Red,vce_Green,vce_Blue;        /* 16 bit color */
  69. };
  70.  
  71. #define VCE_SET_BIT     0
  72.         /*set this to allocate the color */
  73. #define VCE_SET_MASK    (1L<<0)
  74.  
  75. #define VCE_ANSI_BIT    1
  76.         /*set if this defines an ANSI pen */
  77. #define VCE_ANSI_MASK   (1L<<1)
  78.  
  79.  
  80. /* Keeps the TAB settings for one TAB expansion function */
  81.  
  82. struct ViTabPriors {
  83.         BYTE    vtp_PathPri;    /* priority for ordinary files in the path */
  84.         BYTE    vtp_CommandPri; /* priority for commands in C: */
  85.         BYTE    vtp_ResidentPri;/* priority for resident commands */
  86.         BYTE    vtp_InfoPri;    /* priority for icons */
  87.  
  88.         BYTE    vtp_DevicePri;  /* priority for devices */
  89.         BYTE    vtp_AssignPri;  /* priority for assigns */
  90.         BYTE    vtp_VolumePri;  /* priority for volumes */
  91.         BYTE    vtp_DirPri;     /* priority for directories */
  92.  
  93.         BYTE    vtp_FilePri;    /* priority for ordinary files */
  94.         BYTE    vtp_ExecPri;    /* priority for executables */
  95.         BYTE    vtp_ScriptPri;  /* priority for scipts */
  96.  
  97.         UBYTE   vtp_ExpandFlgs; /* flags, see below */
  98. };
  99.  
  100. /* Enable doube TAB requester? */
  101. #define VTPF_DOUBLETAB_BIT      0
  102. #define VTPF_DOUBLETAB_MASK     (1L<<0)
  103.  
  104. /* Enable first TAB expands fully? */
  105. #define VTPF_FULLFIRSTTAB_BIT   1
  106. #define VTPF_FULLFIRSTTAB_MASK  (1L<<1)
  107.  
  108. /* Enable add VNC matches to requester? */
  109. #define VTPF_FOUNDREQ_BIT       2
  110. #define VTPF_FOUNDREQ_MASK      (1L<<2)
  111.  
  112. /* Enable request if ambigous? */
  113. #define VTPF_AMBIGREQ_BIT       3
  114. #define VTPF_AMBIGREQ_MASK      (1L<<3)
  115.  
  116.  
  117. struct VNCPrefs {
  118.         ULONG vpf_Header;       /* should contain HEADERLONG */
  119.         ULONG vpf_Magic1;       /* MUST contain MAGIC1 to be legal preferences */
  120.         ULONG vpf_Magic2;       /* MUST contain MAGIC2 */
  121.         UWORD vpf_Version;      /* version and... */
  122.         UWORD vpf_Revision;     /* revision of THIS structure, now 3.2 */
  123.         ULONG vpf_Flags;        /* bit settings, see below for definition */
  124.         ULONG vpf_FMask;        /* valid bits above */
  125.         ULONG vpf_DOSFlags;     /* more bit settings */
  126.         ULONG vpf_DOSFMask;     /* valid bits */
  127.         UWORD vpf_HistorySize;  /* # lines in the history */
  128.         UWORD vpf_Macros;       /* number of macro-strings defined here.
  129.                                    NEED NOT to be VPF_MACROS! */
  130.         RPTR vpf_MacroOffset;   /* offset of the macro-strings to the
  131.                                    start-address of this structure,
  132.                                    the strings are saved as NUL-
  133.                                    terminated strings */
  134.         UWORD vpf_MacroSize;    /* max. length or macros: VPF_FUNCLENGTH */
  135.  
  136.         /* The next ones are new to 2.00 */
  137.  
  138.         UWORD vpf_UpperLines;   /* upper display size */
  139.         UWORD vpf_LowerLines;   /* lower display size */
  140.  
  141.         /* New to 3.00 */
  142.  
  143.         ULONG vpf_DelayMicros;  /* intuition delay micros,
  144.                                    320000 by default */
  145.         ULONG vpf_RebuildMicros;/* rebuild delay     */
  146.         ULONG vpf_SlowMicros;   /* scroll threshold  */
  147.         ULONG vpf_BlinkMicros;  /* blink speed       */
  148.  
  149.  
  150.         RPTR  vpf_ButtonOffset; /* offset to button strings,
  151.                                    NUL terminated strings, name and
  152.                                    title alternating */
  153.         UWORD vpf_Buttons;      /* # of buttons */
  154.         UWORD vpf_ButtonSize;   /* VPF_SHORTLENGTH */
  155.  
  156.         /* New to 3.30 */
  157.  
  158.         ULONG vpf_DefModeID;    /* default mode ID */
  159.         UWORD vpf_PathOnlyQ;    /* path only icon drop modifier */
  160.         UWORD vpf_NameOnlyQ;    /* name only icon drop modifier */
  161.  
  162.         ULONG vpf_MoreFlags;    /* used since 3.40, see below */
  163.         ULONG vpf_MoreFMask;    /* mask for the field above. Now used */
  164.  
  165.         ULONG vpf_Reserved[2];  /* leave blank */
  166.  
  167.         struct ViColorEntry vpf_CursorColor;      /* the cursor color */
  168.         struct ViColorEntry vpf_Colors[16];       /* color definitions */
  169.  
  170.  
  171.         /* 3.60 expansions start here */
  172.  
  173.         UWORD vpf_TABExpMask;   /* mask of valid bits in vtp_ExpandFlgs */
  174.  
  175.         struct ViTabPriors vpf_TABPriors;       /* Expand Path */
  176.         struct ViTabPriors vpf_SrtPriors;       /* Expand Short */
  177.         struct ViTabPriors vpf_DevPriors;       /* Expand Devs */
  178.         struct ViTabPriors vpf_DirPriors;       /* Expand Dirs */
  179.         struct ViTabPriors vpf_InfPriors;       /* Expand Icons */
  180.         struct ViTabPriors vpf_AltPriors;       /* Expand Alt */
  181.  
  182.         UWORD vpf_CacheLines;                   /* size of the cache */
  183.  
  184.         WORD vpf_ReqLeft;                       /* requester position */
  185.         WORD vpf_ReqTop;                        /* default is -1,-1 */
  186.  
  187.         UWORD vpf_ReqWidth;                     /* requester size */
  188.         UWORD vpf_ReqHeight;                    /* default is 0,0 */
  189.  
  190.         struct ViNCExtMap vpf_Keyboard;         /* keyboard definition */
  191.  
  192. /* More here... DO NOT ALLOCATE YOURSELF, USE THE vnc.library FUNCTIONS
  193.    for handling or extracting the strings */
  194.  
  195. };
  196.  
  197. /* Macros to extract the strings from this structure. Uhm, it's
  198.    definitely easier to use the library functions Prefs2List and
  199.    List2Prefs. */
  200.  
  201. #define VPF_FIRSTMACRO(prefs) ((char *)(prefs)+(prefs)->vpf_MacroOffset)
  202.                            /* How to get the first macro */
  203.  
  204. #define VPF_FIRSTBUTTON(prefs) ((char *)(prefs)+(prefs)->vpf_ButtonOffset)
  205.                            /* How to